//
//  HLIMKitMessageModel.h
//  YueYue
//
//  Created by hulu001 on 2024/1/11.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface HLIMKitMessageModel : NSObject

@property (nonatomic, strong)   NIMMessage * message;

/// 时间戳
@property (nonatomic, readonly) NSTimeInterval messageTime;

@property (nonatomic, readonly) UIEdgeInsets  contentViewInsets;

@property (nonatomic, readonly) UIEdgeInsets  bubbleViewInsets;

@property (nonatomic, readonly) UIEdgeInsets  replyContentViewInsets;

@property (nonatomic, readonly) UIEdgeInsets  replyBubbleViewInsets;

@property (nonatomic, readonly) CGPoint avatarMargin;

@property (nonatomic, readonly) CGPoint nickNameMargin;

@property (nonatomic, readonly) CGSize avatarSize;

@property (nonatomic, assign) BOOL shouldShowAvatar;

@property (nonatomic, readonly) BOOL shouldShowLeft;

@property (nonatomic, readonly) BOOL shouldShowUnRead;

@property (nonatomic, readonly) BOOL shouldShowTime;

@property (nonatomic, copy) NSString *messageContentName;

@property (nonatomic, assign) BOOL isRemoteRead;

/*** 该消息回复的消息内容 ****/
@property (nonatomic,strong) NIMMessage *repliedMessage;

@property (nonatomic) BOOL enableRepliedContent; //显示被回复消息内容

/// 记录最新的已播放到的位置
@property (nonatomic, assign) NSTimeInterval seekTime;
/// 人为改变的起始位置
@property (nonatomic, assign) NSTimeInterval seek;

- (instancetype)initWithMessage:(NIMMessage *)message;

/// 计算内容大小
- (CGSize)contentSize:(CGFloat)width;
/**
 *  计算回复内容大小
 */
- (CGSize)replyContentSize:(CGFloat)width;

/**
 * thread talk 显示被回复内容
 *
 * @return 是否显示回复内容
 */
- (BOOL)needShowRepliedContent;

/**
 *  清楚缓存的排版数据
 */
- (void)cleanCache;

@end

NS_ASSUME_NONNULL_END
